function createThunkMiddleware(extraArgument) {
    return ({dispatch,getState}) => next => action => {
        if(typeof action === 'function') {
            return action(dispatch,getState, extraArgument)
        }
        next(action) 
    }
}
const thunk  = createThunkMiddleware();
thunk.widthExtraArgument = createThunkMiddleware;
export default thunk